package com.qfmy.model.entity.listenBook;

import com.qfmy.model.entity.user.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 清风明月
 * @Package com.qfmy.model.entity.audio
 * @date 2025/11/01
 * @description 音频章节表实体类（映射数据库audio_chapter表）
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AudioChapter extends BaseEntity {

    @Schema(description = "章节ID（主键）")
    private Long chapterId;

    @Schema(description = "父音频ID（关联audio_resource，对应整部作品）")
    private Long parentAudioId;

    @Schema(description = "章节标题（如“第1章 红岸基地”）")
    private String chapterTitle;

    @Schema(description = "章节序号（用于排序，如1、2、3）")
    private Integer chapterOrder;

    @Schema(description = "章节时长（单位：秒，默认0）")
    private Integer duration;

    @Schema(description = "章节文件大小（单位：字节，默认0）")
    private Long fileSize;

    @Schema(description = "章节音频URL（默认占位URL：https://audio.example.com/chapter-unavailable.mp3）")
    private String fileUrl;

    @Schema(description = "是否免费：0-付费，1-免费（试听章节常用，默认1）")
    private Integer isFree;

    @Schema(description = "章节状态：0-下架，1-上线，2-审核中（默认2）")
    private Integer status;

    @Schema(description = "章节播放量")
    private Integer play;
}